package cn.community.system.service;

import cn.community.system.domain.Member;
import cn.community.system.query.MemberQuery;
import cn.community.system.query.QueryObject;
import cn.community.system.vo.AssoMemberVo;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

public interface IMemberService {
    void delete(Long id);
    Long save(Member member);
    Member get(Long id);
    List<Member> listAll();
    void update(Member member);

    // 分页
    PageInfo query(QueryObject qo);
    PageInfo queryByAssoId(MemberQuery qo);

    /**
     * 检查手机号是否存在
     * @param phone
     * @return true 存在 false 不存在
     */
    boolean checkPhone(String phone);

    // 检查社团是否存在
    Long checkAssociation(String association);

    // 检查部门是否存在
    Long checkDept(Long id);

    // 注册
    void regist(Member member,String rpassword);

    // 登录
    Member userLogin(String username,String password);

    // 批量删除
    void batchDelete(Long[] ids);

    // 导入
    void importXls(MultipartFile file) throws Exception;

    // 导出
    Workbook exportXls();
    Workbook exportXls2();

    Long findIdByName(String applicant);

    void passOne(Long id,Long assoId,Integer isAgree);

    Member getUserByNumber(String number);

    void myUpdate(Member member);

    void edit(AssoMemberVo assoMemberVo);

    void updateActivitiesAndTime(Member member);
}
